# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Kyle Keen <keenerd@gmail.com>

_pyname=ipykernel
pkgname=python-$_pyname
pkgver=6.22.0
pkgrel=3
pkgdesc='The ipython kernel for Jupyter'
arch=(any)
url='https://pypi.org/project/ipykernel/'
license=(BSD)
depends=(python-comm python-tornado ipython python-jupyter-client python-debugpy python-psutil python-nest-asyncio)
makedepends=(python-build python-installer python-hatchling)
checkdepends=(python-pytest-timeout python-pytest-asyncio python-flaky python-ipyparallel python-matplotlib)
source=(https://github.com/ipython/ipykernel/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('0dd26e55f9a975e58049e1f4f2ea4306a98deb748cb4d25cac774597aa3a1546')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $_pyname-$pkgver
  pytest -v
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
